package com.solt.prism.dao.imp;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.solt.prism.dao.JosContentFrontPage;
@Deprecated
public class JosContentFrontPageImp implements JosContentFrontPage {
		
	public static final String SQL_STRING = "SELECT * FROM jos_content_frontpage ";
	
	public static JosContentFrontPage getJosContentFrontPage () throws SQLException {
		return new JosContentFrontPageImp();
	}
	
	public JosContentFrontPageImp() throws SQLException {
	}
	
	
	@Override
	public int insertFrontPage (int newId, int order)  {
		
		Connection connection = null;
		PreparedStatement prest = null;
		try {
			connection = SqlConnectionPool.getConnection();
			prest = connection.prepareStatement(SQL_STRING);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			 
			try {
				if (prest != null) 
				prest.executeUpdate();
			} catch (SQLException e) {
				e.printStackTrace();
			}
			try {
				if (connection != null)
					connection.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		
		return 0;
	}
}
